校验解码

FFIB 9 hours ago
parent
commit
416eebe75b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      api/encrypt_views.py

+ 2 - 2
api/encrypt_views.py

@@ -165,7 +165,7 @@ def decrypt(request, v='v2'):
165 165
     lotterys = LotteryCampaignInfo.objects.filter(status=True)
166 166
    
167 167
     if lotterys.exists():
168
-        active_lotterys = [lottery.data for lottery in lotterys if lottery.is_active()]
168
+        active_lotterys = [lottery.data for lottery in lotterys if lottery.is_active() and model.model_id in lottery.model_ids]
169 169
     else:
170 170
         active_lotterys = None
171 171
 
@@ -269,7 +269,7 @@ def decrypt2(request, v='v2'):
269 269
     lotterys = LotteryCampaignInfo.objects.filter(status=True)
270 270
    
271 271
     if lotterys.exists():
272
-        active_lotterys = [lottery.data for lottery in lotterys if lottery.is_active()]
272
+        active_lotterys = [lottery.data for lottery in lotterys if lottery.is_active() and model.model_id in lottery.model_ids]
273 273
     else:
274 274
         active_lotterys = None
275 275